<?php

//home

Route::get('/' , 'Home\IndexController@index');
Route::get('shop' , 'Home\ShopController@shop');
Route::get('team' , 'Home\TeamController@team');
Route::get('experiance' , 'Home\ExperianceController@experiance');
Route::get('contact' , 'Home\ContactController@contact');
Route::get('single/{goods_id}' , 'Home\SingleController@single');
//活动
Route::get("newslist" , "Home\NewsController@newslist");
Route::get("news/{nid?}" , "Home\NewsController@news");

//用户登录
Route::get('login' , 'Auth\AuthController@getLogin');
Route::post('login' , 'Auth\AuthController@postLogin');
Route::get('auth/login' , function(){
	return redirect('login');
});
//用户注册
Route::get('register' , 'Auth\AuthController@getRegister');
Route::post('register' , 'Auth\AuthController@postRegister');
//用户退出
Route::get("checkout" , "Auth\AuthController@getLogout");
//购物车
Route::get("shoppingcart" , "Home\ShoppingCartController@shoppingcart");
Route::post("shoppingadd/{goods_id}" , "Home\ShoppingCartController@shoppingadd");

/**
 * 留言模板
 */
Route::get("comm" , "Home\CommController@comm");
Route::post("comm" , "Home\CommController@postcomm");

/**
 * 用户资料
 */
Route::get("details" , "Home\UserDetailsController@details");
Route::post("details" , "Home\UserDetailsController@postdetails");

//后台首页
Route::get('am','Admin\IndexController@index');

//商品
//列表
Route::get("amgoods" , "Admin\GoodsController@goodslist");
//添加
Route::get("amgoodsadd" , "Admin\GoodsController@goodsadd");
Route::post("amgoodsadd" , "Admin\GoodsController@goodsadd");
//编辑
Route::get("amgoodsedit/{goods_id}" , "Admin\GoodsController@goodsedit");
Route::post("amgoodsedit/{goods_id}" , "Admin\GoodsController@goodsedit");
//删除
Route::get("amgoodsdel/{goods_id}" , "Admin\GoodsController@goodsdel");




//栏目
//增加栏目
Route::get('catadd','Admin\CatController@catadd');
Route::post('catadd','Admin\CatController@catadd');

//栏目列表
Route::get('catlist','Admin\CatController@catlist');

//修改栏目
Route::get('catedit/{cat_id}','Admin\CatController@catedit');
Route::post('catedit/{cat_id}','Admin\CatController@catedit');

//删除栏目
Route::get('catdel/{cat_id}','Admin\CatController@catdel');







//活动留言
Route::get('amcomm' , 'Admin\CommController@commlist');
//留言页右边
Route::get('you/{commentid?}', 'Admin\CommController@you');
Route::post('you/{commentid?}', 'Admin\CommController@youPost');
//留言页中间
Route::get('centre/{style?}', 'Admin\CommController@centre');
Route::post('centre/{style?}', 'Admin\CommController@centrePost');


//文章发布
Route::get('amaradd','Admin\ArticleController@getadd');
Route::post('amaradd','Admin\ArticleController@postadd');
//文章列表
Route::get('amarlist','Admin\ArticleController@articlelist');
//文章修改
Route::get('amarted/{nid?}','Admin\ArticleController@articleedit');
Route::post('amarted/{nid?}','Admin\ArticleController@articleedit');


//文章删除
Route::get('amardel/{nid?}','Admin\ArticleController@articledel');

//文章栏目添加
Route::get('amarcad','Admin\ArcatController@getadd');
Route::post('amarcad','Admin\ArcatController@postadd');

//栏目列表
Route::get('arcatlist','Admin\ArcatController@arcatlist');

//栏目修改
Route::get('arcatedit/{cid}','Admin\ArcatController@arcatedit');
Route::post('arcatedit/{cid}','Admin\ArcatController@arcatedit');
//栏目删除
Route::get('arcatdel/{cid}','Admin\ArcatController@arcatdel');

